﻿using Prism.Commands;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace demo
{
    public class MainViewModel: BindableBase
    {

        public DelegateCommand CancelCommand { get; set; }

        public MainViewModel()
        {
            CancelCommand = new DelegateCommand(OnCancel);
        }

        private bool? _dialogResult;
        public bool? DialogResult
        {
            get { return _dialogResult; }
            set { _dialogResult = value; RaisePropertyChanged(); }
        }

        public void OnCancel()
        {
            DialogResult = false;
            
        }

    }
}
